package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.Orders;
import com.sky.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OrderAdminMapper {
    Page<Orders> selectOrderByDTO(OrdersPageQueryDTO ordersPageQueryDTO);

    //查询出待接单、待派送、派送中的订单数量
    @Select("select count(id) from orders where status = #{status}")
    Integer countStatus(Integer toBeConfirmed);

    @Select("select * from orders where id = #{id}")
    OrderVO selectOrder(Long id);


    @Select("select * from orders where id = #{id}")
    Orders getById(Long id);

    @Select("select * from orders where id = #{id}")
    Orders selectOrderById(Long id);
}
